package com.project.remote;

import com.github.pagehelper.PageInfo;
import com.project.ResultVO;
import com.project.mapper.SuppliersDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(name = "supplier")
public interface ISupplierRemoteService {

    @GetMapping("supplier/findByItem/{page}/{pageSize}/{name}/{range}")
    public PageInfo<SuppliersDto> findByItem(@PathVariable("page") int page,
                                             @PathVariable("pageSize") int pageSize,
                                             @PathVariable("name") String name,
                                             @PathVariable("range") String range);

    @PostMapping("supplier/add")
    public ResultVO add(@RequestBody SuppliersDto supplier);

    @GetMapping("supplier/findById/{id}")
    public SuppliersDto findById(@PathVariable("id")int id);

    @PutMapping("supplier/update")
    public ResultVO update(@RequestBody SuppliersDto supplier);
}
